package com.jy.adscm.operation.cg.bean;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.junit.Test;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zyl
 * @since 2019-07-12
 */
public class MachineProcess implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    //工序id
    private Integer id;
    //工序名称
    private String name;
    /**
     * 耗时
     */
    @TableField("useTime")
    private Float useTime;
    private Integer rank;
    //开工时间
    @TableField(exist = false)
    private Date startTime;
    @TableField(exist = false)
    private Date  endTime;
    @TableField(exist = false)
    private List<CgMaterial> cgMaterials;
    @TableField(exist = false)
    private Date  preDate;
    @TableField(exist = false)
    private Date  lateDate;
    @TableField(exist = false)
    private Date  earlyDate;
    @TableField(exist = false)
    private Float deTime;//定额时间
    @TableField(exist = false)
    private Float total;//总价
    private String  text;

    @TableField(exist = false)
    private Date  arriveDate;

    @TableField("makeNo")
    private  String makeNo;

    @TableField(exist = false)
    private  Integer nums;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getArriveDate() {
        return arriveDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setArriveDate(Date arriveDate) {
        this.arriveDate = arriveDate;
    }

    public Integer getNums() {
        return nums;
    }

    public void setNums(Integer nums) {
        this.nums = nums;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getMakeNo() {
        return makeNo;
    }

    public void setMakeNo(String makeNo) {
        this.makeNo = makeNo;
    }

    public Float getTotal() {
        return total;
    }

    public void setTotal(Float total) {
        this.total = total;
    }

    public Float getDeTime() {
        return deTime;
    }

    public void setDeTime(Float deTime) {
        this.deTime = deTime;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getEarlyDate() {
        return earlyDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setEarlyDate(Date earlyDate) {
        this.earlyDate = earlyDate;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getPreDate() {
        return preDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setPreDate(Date preDate) {
        this.preDate = preDate;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getLateDate() {
        return lateDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setLateDate(Date lateDate) {
        this.lateDate = lateDate;
    }

    public List<CgMaterial> getCgMaterials() {
        return cgMaterials;
    }

    public void setCgMaterials(List<CgMaterial> cgMaterials) {
        this.cgMaterials = cgMaterials;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getStartTime() {
        return startTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getEndTime() {
        return endTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Float getUseTime() {
        return useTime;
    }

    public void setUseTime(Float useTime) {
        this.useTime = useTime;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    @Override
    public String toString() {
        return "MachineProcess{" +
        "id=" + id +
        ", name=" + name +
        ", useTime=" + useTime +
        ", rank=" + rank +
        "}";
    }
}
